package ru.silviasaint.fridge.server.system;

import java.sql.SQLException;

import com.j256.ormlite.jdbc.JdbcPooledConnectionSource;
import com.j256.ormlite.support.ConnectionSource;

public class ResourceLocator {

	private static String driver = "org.apache.derby.jdbc.EmbeddedDriver";
	static{
		try {
			Class.forName(driver).newInstance();
		} catch (InstantiationException e) {
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			e.printStackTrace();
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		}
	}
	public static ConnectionSource getSource() throws SQLException{
		return new JdbcPooledConnectionSource ("jdbc:derby:derbyDB;create=true");
	}

}
